Repository navigation
feat(mcp): add opt-in tool contract digests and pin checks - #32
Conversation
Add schema digests to /mcp tools/list on Flask and the edge Worker and reject a mismatched X-MultiLLM-MCP-Contract pin with 409 before dispatch, behind MCP_CONTRACT_DIGESTS_ENABLED, default off. The catalogue script gains --baseline and --diff.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
multillm-proxy | 3153640 | Oct 08 2026, 10:08 PM |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
9d43b50
into
integrate/gateway-waves-1-2
Summary
Adds MCP schema compatibility digests behind
MCP_CONTRACT_DIGESTS_ENABLED, which defaults to false. While the flag is off,/mcpdiscovery and tool calls return exactly what they do today, and anX-MultiLLM-MCP-Contractheader is ignored.tools/liston both the Flask gateway and the edge Worker adds_meta.contract_digest:X-MultiLLM-MCP-Contract: <digest>. On a mismatch,tools/callreturns HTTP 409mcp_contract_mismatchwithCache-Control: no-store.scripts/build_knowledge_mcp_catalogue.pygains:--baseline PATH, which writes a contract baseline;--diff PATH, which classifies changes against it and exits 1 on a breaking change.docs/mcp-contract-baseline.jsonis the current baseline.Details are in
docs/mcp-contract-drift.md.Shared registrations
tests/test_mcp_contract_drift_worker.mjstotest:worker.MCP_CONTRACT_DIGESTS_ENABLEDto the Container env keys.worker/knowledge/contract-drift.mjsto the secret firewall inventory.Tests
tests/test_mcp_contract_drift.pyandtests/test_mcp_contract_drift_worker.mjs: new, through the registered Flask and Worker/mcppaths.npm run test:worker: 1,238 passed.cf:migrations:check,test:deploy, free routes, client headers and thewrangler deploy --dry-runbundle all pass.tests/test_frontend_build.mjsfails locally because@tailwindcss/cliis not installed. It fails the same way on main.This is part of Wave 3. It is based on the Wave 2 integration branch (#25), and the Wave 3 integration PR adds the README line.